package com.example.sql_2_code_demo.entity;

import java.util.Date;
import java.io.Serializable;

/**
 * 订单表(Order)实体类
 *
 * @author makejava
 * @since 2022-10-09 10:01:32
 */
public class Order implements Serializable {
    private static final long serialVersionUID = -89910054400203911L;
    /**
     * 主键id
     */
    private Long id;
    /**
     * 订单编号
     */
    private String orderCode;
    /**
     * 订单总金额：商品销售价*购买数量之和
     */
    private Double totalAmount;
    /**
     * 订单应付金额：订单总金额-优惠总金额
     */
    private Double payMount;
    /**
     * 支付交易号
     */
    private String tradeCode;
    /**
     * 支付方式：1:wxpay；2:alipay；3:xianjin;
     */
    private Integer payMethod;
    /**
     * SUCCESS—支付成功；
     * REFUND—转入退款；
     * NOTPAY—未支付；
     * CLOSED—已关闭；
     * REVOKED—已撤销（刷卡支付）；
     * USERPAYING--用户支付中；
     * PAYERROR--支付失败(其他原因，如银行返回失败)；
     */
    private String tradeStatus;
    /**
     * 订单状态：0->待付款；1->待发货；2->部分发货；3->已发货；4->已收货；5->已完成；6->已关闭；7->已取消；合同订单状态：201->签约；202->执行中；203->已结束；204->意外终止；
     */
    private Integer orderStatus;
    /**
     * 订单取消时间
     */
    private Date cancelTime;
    /**
     * 关闭时间，同时用作合同订单的结束时间
     */
    private Date closeTime;
    /**
     * 付款时间，同时用作合同订单的开始时间
     */
    private Date paymentTime;
    /**
     * 完成时间
     */
    private Date orderEndTime;
    /**
     * 商品分类id
     */
    private Long goodsCategoryId;
    /**
     * 商品分类名称
     */
    private String goodsCategoryName;
    /**
     * 合并订单号：引用到or_order_combine_transaction 表的合并订单号（merge_order_id_hash_code）。具有相同合并支付订单号的订单是同一个合并支付的订单。
     */
    private String mergeOrderCode;
    /**
     * 订单实际支付时，付款的金额（单位：元）；如果是：合并订单支付时，所有合并订单的所有总金额；如果是：普通订单支付时，当前订单的实际付款金额
     */
    private Double actualPayAmount;
    /**
     * 更新人ID
     */
    private Long updateUser;
    /**
     * 订单所属人id
     */
    private Long ownerUserId;
    /**
     * 订单企业拥有者id，只有当企业为企业自己付款时，此字段才有效
     */
    private Long ownerEnterpriseId;
    /**
     * 用户ID
     */
    private Long payerUserId;
    /**
     * 付款人代表的企业id，只有当企业用户为旗下普通用户付款时，此字段才有效
     */
    private Long payerEnterpriseId;
    /**
     * 订单关联发票的id
     */
    private Long invoiceId;
    /**
     * 商品项数量:一台手机，两本书，就是2
     */
    private Integer orderItemCount;
    /**
     * 发票状态：0->不开发票；1->开发票
     */
    private Integer invoiceStatus;
    /**
     * 启用禁止状态：0->启用；1->禁止；2->可见的删除
     */
    private Integer status;
    /**
     * 提交时间
     */
    private Date createTime;
    /**
     * 修改时间
     */
    private Date updateTime;
    /**
     * 创建人ID
     */
    private Long createUser;
    /**
     * 部门ID
     */
    private Long createDept;
    /**
     * 删除状态：0->未删除；2->已删除
     */
    private Integer isDeleted;
    /**
     * 租户ID
     */
    private String tenantId;
    /**
     * 订单备注
     */
    private String remark;
    /**
     * 付款凭据url链接
     */
    private String paymentCredentialUrl;
    /**
     * 收款凭据url
     */
    private String receiptPaymentUrl;
    /**
     * 对spu类型的快照，为简化查询
     */
    private Integer spuType;
    /**
     * 退款凭证url，多个url之间使用英文逗号（,）隔开
     */
    private String refundCredentialUrl;
    /**
     * 退款备注
     */
    private String refundRemark;
    /**
     * 执行退款操作的用户id
     */
    private Long refundUserId;
    /**
     * 订单的父子级，如果parent_id==0，则代表此订单在【缴费管理】页面中直接显示；如果parent_id!=0，则代表这个订单是合并支付的子订单，不在【缴费管理】页面中显示
     */
    private Long parentId;
    /**
     * 此订单支付时使用的是哪一个支付设置id
     */
    private Long paySettingId;
    /**
     * 退款申请时上传的文件url链接
     */
    private String refundApplyUrl;
    /**
     * 0：未发起退款申请；1：已发起退款申请
     */
    private Integer refundApplyStatus;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public Double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Double getPayMount() {
        return payMount;
    }

    public void setPayMount(Double payMount) {
        this.payMount = payMount;
    }

    public String getTradeCode() {
        return tradeCode;
    }

    public void setTradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
    }

    public Integer getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(Integer payMethod) {
        this.payMethod = payMethod;
    }

    public String getTradeStatus() {
        return tradeStatus;
    }

    public void setTradeStatus(String tradeStatus) {
        this.tradeStatus = tradeStatus;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Date getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(Date cancelTime) {
        this.cancelTime = cancelTime;
    }

    public Date getCloseTime() {
        return closeTime;
    }

    public void setCloseTime(Date closeTime) {
        this.closeTime = closeTime;
    }

    public Date getPaymentTime() {
        return paymentTime;
    }

    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }

    public Date getOrderEndTime() {
        return orderEndTime;
    }

    public void setOrderEndTime(Date orderEndTime) {
        this.orderEndTime = orderEndTime;
    }

    public Long getGoodsCategoryId() {
        return goodsCategoryId;
    }

    public void setGoodsCategoryId(Long goodsCategoryId) {
        this.goodsCategoryId = goodsCategoryId;
    }

    public String getGoodsCategoryName() {
        return goodsCategoryName;
    }

    public void setGoodsCategoryName(String goodsCategoryName) {
        this.goodsCategoryName = goodsCategoryName;
    }

    public String getMergeOrderCode() {
        return mergeOrderCode;
    }

    public void setMergeOrderCode(String mergeOrderCode) {
        this.mergeOrderCode = mergeOrderCode;
    }

    public Double getActualPayAmount() {
        return actualPayAmount;
    }

    public void setActualPayAmount(Double actualPayAmount) {
        this.actualPayAmount = actualPayAmount;
    }

    public Long getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Long updateUser) {
        this.updateUser = updateUser;
    }

    public Long getOwnerUserId() {
        return ownerUserId;
    }

    public void setOwnerUserId(Long ownerUserId) {
        this.ownerUserId = ownerUserId;
    }

    public Long getOwnerEnterpriseId() {
        return ownerEnterpriseId;
    }

    public void setOwnerEnterpriseId(Long ownerEnterpriseId) {
        this.ownerEnterpriseId = ownerEnterpriseId;
    }

    public Long getPayerUserId() {
        return payerUserId;
    }

    public void setPayerUserId(Long payerUserId) {
        this.payerUserId = payerUserId;
    }

    public Long getPayerEnterpriseId() {
        return payerEnterpriseId;
    }

    public void setPayerEnterpriseId(Long payerEnterpriseId) {
        this.payerEnterpriseId = payerEnterpriseId;
    }

    public Long getInvoiceId() {
        return invoiceId;
    }

    public void setInvoiceId(Long invoiceId) {
        this.invoiceId = invoiceId;
    }

    public Integer getOrderItemCount() {
        return orderItemCount;
    }

    public void setOrderItemCount(Integer orderItemCount) {
        this.orderItemCount = orderItemCount;
    }

    public Integer getInvoiceStatus() {
        return invoiceStatus;
    }

    public void setInvoiceStatus(Integer invoiceStatus) {
        this.invoiceStatus = invoiceStatus;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Long createUser) {
        this.createUser = createUser;
    }

    public Long getCreateDept() {
        return createDept;
    }

    public void setCreateDept(Long createDept) {
        this.createDept = createDept;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPaymentCredentialUrl() {
        return paymentCredentialUrl;
    }

    public void setPaymentCredentialUrl(String paymentCredentialUrl) {
        this.paymentCredentialUrl = paymentCredentialUrl;
    }

    public String getReceiptPaymentUrl() {
        return receiptPaymentUrl;
    }

    public void setReceiptPaymentUrl(String receiptPaymentUrl) {
        this.receiptPaymentUrl = receiptPaymentUrl;
    }

    public Integer getSpuType() {
        return spuType;
    }

    public void setSpuType(Integer spuType) {
        this.spuType = spuType;
    }

    public String getRefundCredentialUrl() {
        return refundCredentialUrl;
    }

    public void setRefundCredentialUrl(String refundCredentialUrl) {
        this.refundCredentialUrl = refundCredentialUrl;
    }

    public String getRefundRemark() {
        return refundRemark;
    }

    public void setRefundRemark(String refundRemark) {
        this.refundRemark = refundRemark;
    }

    public Long getRefundUserId() {
        return refundUserId;
    }

    public void setRefundUserId(Long refundUserId) {
        this.refundUserId = refundUserId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getPaySettingId() {
        return paySettingId;
    }

    public void setPaySettingId(Long paySettingId) {
        this.paySettingId = paySettingId;
    }

    public String getRefundApplyUrl() {
        return refundApplyUrl;
    }

    public void setRefundApplyUrl(String refundApplyUrl) {
        this.refundApplyUrl = refundApplyUrl;
    }

    public Integer getRefundApplyStatus() {
        return refundApplyStatus;
    }

    public void setRefundApplyStatus(Integer refundApplyStatus) {
        this.refundApplyStatus = refundApplyStatus;
    }

}

